package Task28;

public class Main {
	static Controller tester;
	static Command command = new Command();

	public static void main(String[] args) {
		tester = new Controller();

		System.out.println("--------------------Start-----------------");
		String[] args1 = { "C:\\TEST1" };
		command.setNameCommand("dir");
		command.setArgs(args1);
		command.setWorkDir("C:\\TEST1");

		Result result = new Result();
		try {
			result = tester.getResult(command);
		} catch (Exception e1) {
			e1.printStackTrace();
		}

		for (int i = 0; i < result.getData().size(); i++) {
			System.out.println(result.getData().get(i));
		}
		// System.out.println("Not stop!");
		System.out.println("\n-----------------Errors-----------------\n");
		for (int i = 0; i < result.getErrors().size(); i++) {
			System.out.println(result.getErrors().get(i));
		}
		System.out.println("\n-----------------Exceptions-----------------\n");
		for (int i = 0; i < result.getExceptions().size(); i++) {
			System.out.println(result.getExceptions().get(i));
		}

	}

	
}
